<template>
    <div class="order-box">
        <div class="acea-row row-middle row-between">
            <div class="acea-row row-middle">
                <img src="../assets/images/order_left_icon.png" alt="order-left-icon" class="order-left-icon">
                <div class="order-title">{{orderList.title}}</div>
            </div>
            <slot name="head-right" :orderList="orderList">
                <img :src="arrowRight" alt="arrow-right" class="arrow-right">
            </slot>
        </div>
        <div class="order-name">{{orderList.name}}</div>
        <div class="acea-row row-middle row-between">
            <div class="order-time acea-row row-column row-column-between">
                <div>开始时间：{{orderList.startTime}}</div>
                <div>结束时间：{{orderList.endTime}}</div>
            </div>
            <slot name="bottom-btn" :orderList="orderList">

            </slot>
        </div>
    </div>
</template>

<script>
    const loadImg = name => require(`@/assets/images/${name}.png`)
    export default {
        name: "OrderList",
        props: {
            orderList:{
              type: Array
            },
            arrowRight: {
                required: true,
                default: loadImg('arrow-right')
            }
        },
        data() {
            return {

            }
        }
    }
</script>

<style scoped lang="scss">
    .order-box {
        width: 355px;
        height: 150px;
        background: rgba(255, 255, 255, 1);
        border-radius: 8px;
        padding: 20px;

        .order-left-icon {
            width: 15px;
            height: 15px;
        }

        .order-title {
            font-size: 14px;
            font-weight: 400;
            color: rgba(66, 69, 95, 1);
            margin-left: 9px;
        }

        .arrow-right {
            width: 14px;
            height: 14px;
        }

        .order-name {
            font-size: 18px;
            font-weight: 500;
            color: rgba(66, 69, 95, 1);
            margin: 17px 0 10px;
        }

        .order-time {
            font-size: 12px;
            font-weight: 400;
            color: rgba(163, 165, 177, 1);
            height: 40px;
        }

    }
</style>
